<?php /* Smarty version 2.6.26, created on 2011-02-27 06:57:12
         compiled from admin/customer_message_manage.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="container">
	<div class="floattop">
		<div class="itemtitle">
			<h3>客户留言管理</h3>
			<ul class="tab1">
				<li><a href="customer_message_manage.php"><span>客户留言列表</span></a></li>
			</ul>
		</div>
	</div>
	<div class="floattopempty"></div>
		<div class="list-div">
		<table class="tb tb2" cellspacing="1" cellpadding="3">
			<tbody>
				<tr class="header">
					<th>姓名</th>
					<th>邮箱</th>
					<th>固定电话</th>
					<th>移动电话</th>
					<th>咨询内容</th>
					<th>操作</th>
				</tr>
				<?php $_from = $this->_tpl_vars['message']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['m']):
?>
				<tr class="td-cls">
					<td><?php echo $this->_tpl_vars['m']['c_name']; ?>
</td>
					<td><?php echo $this->_tpl_vars['m']['c_email']; ?>
</td>
					<td><?php echo $this->_tpl_vars['m']['c_phone']; ?>
</td>
					<td><?php echo $this->_tpl_vars['m']['c_mobile']; ?>
</td>
					<td><?php echo $this->_tpl_vars['m']['c_content']; ?>
</td>
					<td><span class="operation"><a href="#" class="del" rel="<?php echo $this->_tpl_vars['m']['c_id']; ?>
">删除</a></span></td>
				</tr>
				<?php endforeach; endif; unset($_from); ?>	
				<tr><td class="pagenavigator" colspan="6"><?php echo $this->_tpl_vars['pagenavigator']; ?>
</td></tr>
			</tbody>
		</table>
		</div>	
</div>
<script type="text/javascript">

$(".del").click(function(){
	if(confirm('删除后不能恢复，确认删除？')) {
		var obj = $(this);
		var c_id = obj.attr('rel');
		$.get('customer_message_manage.php', {act:'del', c_id:c_id}, function(data){ 
			if(data == 1) {
				alert('删除成功');
				obj.parents('tr').remove();	
			}

		});
	}
});

</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
